package com.yixia.web.controller.monitor;

import com.yixia.common.core.domain.AjaxResult;
import com.yixia.framework.web.domain.Server;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 * @author: 依梦
 * @Date 2023/8/27
 */
@RestController
@RequestMapping("/monitor/server")
public class ServerController
{
    @PreAuthorize("@yixia.hasPermi('monitor:server:list')")
    @GetMapping("/list")
    public AjaxResult getInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        AjaxResult success = AjaxResult.success(server);
        return success;
    }
}